package com.chatifyme;


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;

public class BaseActivity extends Activity {
	    
	        ImageView image;
	        LinearLayout linBase;
	   
	       public void onCreate(Bundle savedInstanceState) {
	            super.onCreate(savedInstanceState);
	            
	            super.setContentView(R.layout.masterbase);
	           
	           image = (ImageView)findViewById(R.id.imgSlate);
	           image.setImageResource(R.drawable.slate);
	           
	           
	           
	           linBase = (LinearLayout)findViewById(R.id.linBase);
	           btnHome();
	           
	     }
	       
	       @Override
	       public void setContentView(int id) {
	           LayoutInflater inflater = (LayoutInflater)getBaseContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	           inflater.inflate(id, linBase);
	       }
	       public void btnHome()
	       {
	       	((ImageButton) findViewById(R.id.imgHome)).setOnClickListener(new OnClickListener() {
	   			public void onClick(View v) {
	   				Intent intent=new Intent(getApplicationContext(), SupermainActivity.class);
	   				intent.putExtra("PARENTID", "20");
	   				startActivity(intent);
	   		
	   			 overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
	   			}
	   		});
	       }
	    
	       public String getEditTextValue(int idt)
	       {
	    	   EditText edt=(EditText)findViewById(idt);
	    	   return edt.getText().toString();
	       }
	   }